package com.yy.cleaner.common;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.Serializable;

/**
 * 基本响应结果类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class BaseReponse<T> implements Serializable {
    private int code;
    public String message;
    public T data;
    /**
     * 添加两个构造器
     */
    public BaseReponse(int code){
        this.code = code;
    };
    public BaseReponse(int code,T data){
        this.code = code;
        this.data =  data;
    };
}
